import React, { Component } from 'react'

export default class goback extends Component {
  render() {
    const {props}=this.props
    return (
      <div style={{display:'flex',alignItems:'center',padding:'2px 5px',backgroundColor:'skyblue',position:'relative'}}>
        <div style={{padding:'2px',backgroundColor:'#2274F4',borderRadius:'5px',color:'#fff'}}  onClick={(e)=> {props.history.go(-1)}}>返回</div>
        <div style={{position:'absolute',left:'50%', transform:`translate(-50%)`,color:'#fff'}}>{this.props.title}</div>
      </div>
    )
  }
}
